home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Item MB Quick & Easy 2.0
/
Item MB Quick & Easy 2.0.iso
/
mbfacad
/
0042995.lsp
< prev
next >
Wrap
Text File
|
1998-03-15
|
13KB
|
326 lines
;=============429.95 KLEMMPROFIL 40x40 - 180°
(EAITDBL "0042995")
(EAITmsg "mb_mld10" "\n" "002" nil) (princ "........") (princ EAITnrx) (princ "\n")
(princ)
(defun C:42995H2 (/ P0 P1 P2 P3 P4 P10 P11 P12 P13 E1 E2 E3 E4 E5 E6
Li Lix L2 L2x Wi D40 D5 D14 BName n1 n2 Ben2 Wi2 Px)
(EAITDBL "0042995")
(princ (strcat "\n\n" EAITbez1))
(EAITvari)
(if (not EAITlpr)(setq EAITlpr 0.0))
(EAITvars)
(EAITbpt nil nil nil)
(setq P1 (getpoint))
(if (= P1 nil)(setq P1 (EAITrpt)))
(EAITmsg "mb_mld1" "\n" "005" " <")(princ EAITlpr)(princ "> ") ;Laenge < >
(initget (+ 2 4))
(setq Li (getdist " "))
(if (= Li nil)(setq Li EAITlpr))
(while (or (> Li EAITlmax)(<= Li EAITlmin))
(EAITmsg "mb_mld1" "\n\n" "006" " ")(princ EAITlmin)(princ " / ")(princ EAITlmax)(EAITmsg "mb_mld1" " " "007" nil)
(EAITmsg "mb_mld1" "\n" "005" " <")(princ EAITlpr)(princ "> ")
(initget (+ 2 4))
(setq Li (getdist " "))
(if (= Li nil)(setq Li EAITlpr))
)
(setvar "OSMODE" 0)
;1 Nachkommastelle
(setq Li (/ (float (fix (+ (* Li 10.0) 0.5))) 10))
(princ "\n -> ")(princ Li)
(initget 1)
(EAITmsg "mb_mld10" "\n" "008" nil) ;Konstruktionsrichtung
(setq Wi (getangle P1))
(setq Wi (* 180.0 (/ Wi Pi)))
(cond ((and (>= Wi 90) (< Wi 180)) (setq Li (* Li -1) D40 40.0 D5 5.0 D14 14.0 Wi 135) )
((and (>= Wi 180) (< Wi 270)) (setq D40 -40.0 Li (* Li -1) D5 -35.0 D14 -26.0 Wi 225) )
((and (>= Wi 270) (< Wi 360)) (setq D40 -40.0 D5 -35.0 D14 -26.0 Wi 315) )
(T (setq D40 40.0 D5 5.0 D14 14.0 Wi 45))
)
(setq P2 (list (+ (car P1) Li) (cadr P1))
P3 (list (car P2) (+ (cadr P2) D40))
P4 (list (car P1) (cadr P3))
)
(command EAITlay EAITlse "EAIT50" "")
(command EAITlin P1 P2 "")
(setq E1 (entlast))
(command EAITlin P2 P3 P4 P1 "" )
(setq Px (list (car P1)(+ (cadr P1)(/ D40 2))))
(EAITmsg "mb_mld10" "\n" "019" nil)(EAITmsg "mb_mld10" " " "024" ":") ;Lage der Sichtkante (Return = keine):
(setq Wi2 (getangle Px))
(if (/= Wi2 nil) (setq Wi2 (* 180.0 (/ Wi2 Pi))) )
(if (and (>= Wi2 0) (< Wi2 180))
(setq P10 (list (car P1)(- (cadr P4) D5))
P11 (list (car P2)(cadr P10))
P12 (list (car P1)(- (cadr P4) D14))
P13 (list (car P2)(cadr P12)) )
(setq P10 (list (car P1)(+ (cadr P1) D5))
P11 (list (car P2)(cadr P10))
P12 (list (car P1)(+ (cadr P1) D14))
P13 (list (car P2)(cadr P12)) )
)
(setq BName (EAITbnr))
(if (/= Wi2 nil)
(progn
(command EAITlin P10 P11 "" EAITlin P12 P13 "")
(setq E2 (entnext E1) E3 (entnext E2) E4 (entnext E3) E5 (entnext E4) E6 (entnext E5))
(command EAITblo BName P1 E1 E2 E3 E4 E5 E6 "")
)
(progn
(setq E2 (entnext E1) E3 (entnext E2) E4 (entnext E3))
(command EAITblo BName P1 E1 E2 E3 E4 "")
)
)
(command EAITege BName P1 "" "" "")
(setq Li (abs Li))
(initget (+ 2 4))
(EAITmsg "mb_mld10" "\n\n" "020" ": ") ;Klemmleiste: <1 => L1 - 5.0> / 2 => L1 - 50.0 / 3 => L / Laenge
(setq L2 (getreal))
(cond ((= L2 1)(setq L2 (- Li 5.0)))
((= L2 nil)(setq L2 (- Li 5.0)))
((= L2 2)(setq L2 (- Li 50.0)))
((= L2 3)(setq L2 Li))
)
(if (or(< L2 EAITlmin)(> L2 EAITlmax))
(progn (EAITmsg "mb_mld10" "\n" "021" nil)(EAITmsg "mb_mld13" " " "004" " ")(princ EAITlmin)(EAITmsg "mb_mld13" nil "006" nil)(EAITmsg "mb_mld13" " " "005" " ")
(princ EAITlmax)(EAITmsg "mb_mld13" nil "006" nil) ;Ungültige Laenge: min. EAITlmin mm max. EAITlmax mm
(EAITmsg "mb_mld10" "\n" "022" "\n") ; --> auf 0.0 mm korrigiert
(setq L2 0.0)
)
)
(setq Li (rtos (abs Li) 2 1) L2 (rtos L2 2 1))
(command EAITege (strcat EAITpfn "EAITinfo") (polar P1 (EAITgib Wi) 5) "" "" ""
EAITbez1 EAITbez2 EAITlie1 EAITlie2 EAITwer1 EAITwer2 Li L2 EAITnr
)
;letzte Laenge (Li) merken
(setq Li (atof Li))
(setq EAITlpr Li)
(EAITvarz2)
(princ)
)
(defun C:42995S2 (/ Px P0 P1 P2 P3 P4 P10 P11 P12 P13 E1 E2 E3 E4 E5 E6 Li Lix
L2 L2x Wi Wi2 KWi KWix DWx W90 Wix Wi2x BName n1 n2 Ben2 WU WO W2x)
(EAITDBL "0042995")
(princ (strcat "\n\n" EAITbez1))
(EAITvari)
(if (not EAITlpr)(setq EAITlpr 0.0))
(EAITvars)
(EAITbpt nil nil nil)
(setq P1 (getpoint))
(if (= P1 nil)(setq P1 (EAITrpt)))
(EAITmsg "mb_mld1" "\n" "005" " <")(princ EAITlpr)(princ "> ") ;Laenge < >
(initget (+ 2 4))
(setq Li (getdist " "))
(if (= Li nil)(setq Li EAITlpr))
(while (or (> Li EAITlmax)(<= Li EAITlmin))
(EAITmsg "mb_mld1" "\n\n" "006" " ")(princ EAITlmin)(princ " / ")(princ EAITlmax)(EAITmsg "mb_mld1" " " "007" nil)
(EAITmsg "mb_mld1" "\n" "005" " <")(princ EAITlpr)(princ "> ")
(initget (+ 2 4))
(setq Li (getdist " "))
(if (= Li nil)(setq Li EAITlpr))
)
(setvar "OSMODE" 0)
;1 Nachkommastelle
(setq Li (/ (float (fix (+ (* Li 10.0) 0.5))) 10))
(princ "\n -> ")(princ Li)
(initget 1)
(EAITmsg "mb_mld10" "\n" "004" nil) ;Winkel
(setq Wi (getangle P1))
(setvar "OSMODE" 0)
(initget 1)
(EAITmsg "mb_mld10" "\n" "008" nil) ;Konstruktionsrichtung
(setq KWi (getangle P1))
(setq Wix (EAITbig Wi) KWix (EAITbig KWi))
(if (>= Wix KWix) (setq DWx (+ KWix (- 360 Wix))) (setq DWx (- KWix Wix)))
(cond
( (and (>= DWx 0) (< DWx 90)) (setq W90 90.0) )
( (and (>= DWx 90) (< DWx 180)) (setq W90 -90.0 Wi (+ Wi (EAITgib 180))) )
( (and (>= DWx 180) (< DWx 270)) (setq W90 90.0 Wi (+ Wi (EAITgib 180))) )
( T (setq W90 -90.0) )
)
(setq P2 (polar P1 Wi Li)
P3 (polar P2 (+ Wi (EAITgib W90)) 40.0)
P4 (polar P3 (+ Wi (EAITgib 180)) Li)
)
(command EAITlay EAITlse "EAIT50" "")
(command EAITlin P1 P2 "")
(setq E1 (entlast))
(command EAITlin P2 P3 P4 P1 "")
(setq Px (polar P1 (+ Wi (EAITgib W90)) 20.0))
(EAITmsg "mb_mld10" "\n" "019" nil)(EAITmsg "mb_mld10" " " "024" ":") ;Lage der Sichtkante (Return = keine):
(setq Wi2 (getangle Px))
(if (/= Wi2 nil)(setq Wi2x (EAITbig Wi2)) )
(if (and (/= Wi2 nil)(<= Wix 180)) (setq WU Wix WO (+ Wix 180)) (setq WU (- Wix 180) WO Wix))
(if (and (<= Wi2x WU)(< Wi2 WO)) (setq Wi2x (+ (- 360 WU) Wi2x)))
(if (and (>= W2x WU)(< Wi2x WO))
(setq P10 (polar Px (+ (EAITgib WU)(EAITgib 90)) 15.0) P11 (polar P10 Wi Li)
P12 (polar Px (+ (EAITgib WU)(EAITgib 90)) 6.0) P13 (polar P12 Wi Li))
(setq P10 (polar Px (+ (EAITgib WU)(EAITgib 90))-15.0) P11 (polar P10 Wi Li)
P12 (polar Px (+ (EAITgib WU)(EAITgib 90)) -6.0) P13 (polar P12 Wi Li))
)
(setq BName (EAITbnr))
(if (/= Wi2 nil)
(progn
(command EAITlin P10 P11 "" EAITlin P12 P13 "")
(setq E2 (entnext E1) E3 (entnext E2) E4 (entnext E3) E5 (entnext E4) E6 (entnext E5) )
(command EAITblo BName P1 E1 E2 E3 E4 E5 E6 "")
)
(progn
(setq E2 (entnext E1) E3 (entnext E2) E4 (entnext E3))
(command EAITblo BName P1 E1 E2 E3 E4 "")
)
)
(command EAITege BName P1 "" "" "")
(setq Li (abs Li))
(initget (+ 2 4))
(EAITmsg "mb_mld10" "\n\n" "020" ": ") ;Klemmleiste: <1 => L1 - 5.0> / 2 => L1 - 50.0 / 3 => L / Laenge
(setq L2 (getreal))
(cond ((= L2 1)(setq L2 (- Li 5.0)))
((= L2 nil)(setq L2 (- Li 5.0)))
((= L2 2)(setq L2 (- Li 50.0)))
((= L2 3)(setq L2 Li))
)
(if (or(< L2 EAITlmin)(> L2 EAITlmax))
(progn (EAITmsg "mb_mld10" "\n" "021" nil)(EAITmsg "mb_mld13" " " "004" " ")(princ EAITlmin)(EAITmsg "mb_mld13" nil "006" nil)(EAITmsg "mb_mld13" " " "005" " ")
(princ EAITlmax)(EAITmsg "mb_mld13" nil "006" nil) ;Ungültige Laenge: min. EAITlmin mm max. EAITlmax mm
(EAITmsg "mb_mld10" "\n" "022" "\n") ; --> auf 0.0 mm korrigiert
(setq L2 0.0)
)
)
(setq Li (rtos (abs Li) 2 1) L2 (rtos L2 2 1))
(command EAITege (strcat EAITpfn "EAITinfo") (polar (polar P1 Wi 3.5) (+ Wi (EAITgib W90)) 3.5) "" "" ""
EAITbez1 EAITbez2 EAITlie1 EAITlie2 EAITwer1 EAITwer2 Li L2 EAITnr
)
;letzte Laenge (Li) merken
(setq Li (atof Li))
(setq EAITlpr Li)
(EAITvarz2)
(princ)
)
(defun C:42995V2 (/ P0 P1 P2 P3 P4 P10 P11 P12 P13 E1 E2 E3 E4 E5 E6
Li Lix L2 L2x Wi D40 D5 D14 BName n1 n2 Ben2 Wi2 Px)
(EAITDBL "0042995")
(princ (strcat "\n\n" EAITbez1))
(EAITvari)
(if (not EAITlpr)(setq EAITlpr 0.0))
(EAITvars)
(EAITbpt nil nil nil)
(setq P1 (getpoint))
(if (= P1 nil)(setq P1 (EAITrpt)))
(EAITmsg "mb_mld1" "\n" "005" " <")(princ EAITlpr)(princ "> ") ;Laenge < >
(initget (+ 2 4))
(setq Li (getdist " "))
(if (= Li nil)(setq Li EAITlpr))
(while (or (> Li EAITlmax)(<= Li EAITlmin))
(EAITmsg "mb_mld1" "\n\n" "006" " ")(princ EAITlmin)(princ " / ")(princ EAITlmax)(EAITmsg "mb_mld1" " " "007" nil)
(EAITmsg "mb_mld1" "\n" "005" " <")(princ EAITlpr)(princ "> ")
(initget (+ 2 4))
(setq Li (getdist " "))
(if (= Li nil)(setq Li EAITlpr))
)
(setvar "OSMODE" 0)
;1 Nachkommastelle
(setq Li (/ (float (fix (+ (* Li 10.0) 0.5))) 10))
(princ "\n -> ")(princ Li)
(initget 1)
(EAITmsg "mb_mld10" "\n" "008" nil) ;Konstruktionsrichtung
(setq Wi (getangle P1))
(setq Wi (* 180.0 (/ Wi Pi)))
(cond ( (and (>= Wi 90) (< Wi 180)) (setq D40 -40.0 D5 -35.0 D14 -26.0 Wi 135) )
( (and (>= Wi 180) (< Wi 270)) (setq D40 -40.0 D5 -35.0 D14 -26.0 Li (* Li -1) Wi 225) )
( (and (>= Wi 270) (< Wi 360)) (setq D40 40.0 D5 5.0 D14 14.0 Li (* Li -1) Wi 315) )
(T (setq D40 40.0 D5 5.0 D14 14.0 Wi 45))
)
(setq P2 (list (+ (car P1) D40) (cadr P1))
P3 (list (car P2) (+ (cadr P2) Li))
P4 (list (car P1) (cadr P3))
)
(command EAITlay EAITlse "EAIT50" "")
(command EAITlin P1 P2 "")
(setq E1 (entlast))
(command EAITlin P2 P3 P4 P1 "" )
(setq Px (list (+ (car P1)(/ D40 2)) (cadr P1)))
(EAITmsg "mb_mld10" "\n" "019" nil)(EAITmsg "mb_mld10" " " "024" ":") ;Lage der Sichtkante (Return = keine):
(setq Wi2 (getangle Px))
(if (/= Wi2 nil) (setq Wi2 (* 180.0 (/ Wi2 Pi))))
(if (and (>= Wi2 90) (< Wi2 270))
(setq P10 (list (+ (car P1) D5)(cadr P1))
P11 (list (car P10)(cadr P3))
P12 (list (+ (car P1) D14)(cadr P1))
P13 (list (car P12)(cadr P3)) )
(setq P10 (list (- (car P2) D5)(cadr P1))
P11 (list (car P10)(cadr P3))
P12 (list (- (car P2) D14)(cadr P1))
P13 (list (car P12)(cadr P3)) )
)
(setq BName (EAITbnr))
(if (/= Wi2 nil)
(progn
(command EAITlin P10 P11 "" EAITlin P12 P13 "")
(setq E2 (entnext E1) E3 (entnext E2) E4 (entnext E3) E5 (entnext E4) E6 (entnext E5) )
(command EAITblo BName P1 E1 E2 E3 E4 E5 E6 "")
)
(progn
(setq E2 (entnext E1) E3 (entnext E2) E4 (entnext E3))
(command EAITblo BName P1 E1 E2 E3 E4 "")
)
)
(command EAITege BName P1 "" "" "")
(setq Li (abs Li))
(initget (+ 2 4))
(EAITmsg "mb_mld10" "\n\n" "020" ": ") ;Klemmleiste: <1 => L1 - 5.0> / 2 => L1 - 50.0 / 3 => L / Laenge
(setq L2 (getreal))
(cond ((= L2 1)(setq L2 (- Li 5.0)))
((= L2 nil)(setq L2 (- Li 5.0)))
((= L2 2)(setq L2 (- Li 50.0)))
((= L2 3)(setq L2 Li))
)
(if (or(< L2 EAITlmin)(> L2 EAITlmax))
(progn (EAITmsg "mb_mld10" "\n" "021" nil)(EAITmsg "mb_mld13" " " "004" " ")(princ EAITlmin)(EAITmsg "mb_mld13" nil "006" nil)(EAITmsg "mb_mld13" " " "005" " ")
(princ EAITlmax)(EAITmsg "mb_mld13" nil "006" nil) ;Ungültige Laenge: min. EAITlmin mm max. EAITlmax mm
(EAITmsg "mb_mld10" "\n" "022" "\n") ; --> auf 0.0 mm korrigiert
(setq L2 0.0)
)
)
(setq Li (rtos (abs Li) 2 1) L2 (rtos L2 2 1))
(command EAITege (strcat EAITpfn "EAITinfo") (polar P1 (EAITgib Wi) 5) "" "" ""
EAITbez1 EAITbez2 EAITlie1 EAITlie2 EAITwer1 EAITwer2 Li L2 EAITnr
)
;letzte Laenge (Li) merken
(setq Li (atof Li))
(setq EAITlpr Li)
(EAITvarz2)
(princ)
)
(princ)